' Its been ripped from Charlie Chimp in the nuclear
' power station levels.
'
' Has anyone out there got this far in Charlie Chimp?
'
' Better still - has anyone finished Charlie Chimp
' without using cheat modes?
Priority Reverse On : Rem This command allows us to reverse the order of which BOBS are placed on the screen so that the two fireballs appear behind the gun instead of in front of it!!
Screen Open 0,320,256,16,Lowres : Rem open up the initial screen
Flash Off : Curs Off : Cls 0 : Rem tidy the display
_MAIN_BODY$="Let RS=0;Anim 1,(1,10);Let RW=-1;" : Rem Reset RS to 0, Tell the string to use image number 1 from the sprite bank and set RW to -1 which means the robot is facing left!!
_MAIN_BODY$=_MAIN_BODY$+"label A:Let Y=Y+1;Let RT=X;Let RU=Y;" : Rem This moves the main body part down the screen and tells RT and RU what its coardinates are so that all the other parts can be centered around it
_MAIN_BODY$=_MAIN_BODY$+"If Y=80 Jump label B;Pause;Jump label A;" : Rem Once Y is equal to 80 we jump to the routine that will move the ROBOT to the left
_MAIN_BODY$=_MAIN_BODY$+"label B:Pause;Let X=X-1;" : Rem Move the ROBOT to the left 1 pixel at a time
_MAIN_BODY$=_MAIN_BODY$+"Let RT=X;If X<-66 Jump label D;Jump label B;" : Rem RT is set to the same value of X so that the other channels can get the main bodys X cordinates. When X is less than -66 it jumps to label D
_MAIN_BODY$=_MAIN_BODY$+"label C:Pause;L X=X+1" : Rem Move the ROBOT to the right 1 pixel at a time
_MAIN_BODY$=_MAIN_BODY$+"Let RT=X;If X>370 Jump label E;Jump label C;" : Rem RT is set to the same value of X so that the other channels can get the main bodys X coardinates. When X is greater than 370 it jumps to label E
_MAIN_BODY$=_MAIN_BODY$+"label D:Let RW=1;Let Y=Z(160);" : Rem Set RW to 1 so that we know the ROBOT is facing right and select a new Y coardinate for him
_MAIN_BODY$=_MAIN_BODY$+"Let RU=Y;Anim 1,($8000+1,10);" : Rem Set RU to the new Y coardinate and set the ANIMATION to show image 1 flipped using $8000+1
_MAIN_BODY$=_MAIN_BODY$+"Let R0=Z(40);For R1=0 To R0; Pause;Next R1;Jump label C;" : Rem This line will pause for a random amount of VBL's before jumping to label C which controls the ROBOT moving right
_MAIN_BODY$=_MAIN_BODY$+"label E:Let RW=-1;Let Y=Z(160);" : Rem Set RW To -1 so that we know the ROBOT is facing left and select a new Y coardinate for him
_MAIN_BODY$=_MAIN_BODY$+"Let RU=Y;Anim 1,(1,10);" : Rem Set RU to the new Y coardinate andset the ANIMATION to show image 1 normal
_MAIN_BODY$=_MAIN_BODY$+"Let R0=Z(40);For R1=0 To R0;Pause;Next R1;Jump label B;" : Rem This line will pause for a random amount of VBL's before jumping to label B which controls the ROBOT moving left
_FLAMES$="label C:Anim 0,(3,3)(4,3)(5,3)(4,3);" : Rem This bit sets up the ANIMATION frames of the flames when the ROBOT is moving to the left!
_FLAMES$=_FLAMES$+"label A:Let X=RT;Let Y=RU;If RW=1 Jump label B;Pause;Jump label A;" : Rem This line constantly centres the flames around the ROBOTS X and Y coardinates in RT and RU.
_FLAMES$=_FLAMES$+"label B:Anim 0,($8000+3,3)($8000+4,3)($8000+5,3)($8000+4,3);" : Rem This bit sets up the horizontally flipped ANIMATION frames of the flames when the ROBOT is moving to the right!
_FLAMES$=_FLAMES$+"label E:Let X=RT;Let Y=RU;If RW=-1 Jump label C;Pause;Jump label E;" : Rem This line constantly centres the flames around the ROBOTS X and Y coardinates in RT and RU.
_GUN$="label D:Anim 1,(6,10);" : Rem This part sets up the guns ANIMATION image for moving to the left
_GUN$=_GUN$+"label A:Let X=RT;Let Y=RU;If RW=1 Jump label B;Pause;Jump label A;" : Rem This constantly centres the GUN around the main body of the ROBOT by using the main bodys X and Y coardinates - placed in RT and RU.
_GUN$=_GUN$+"label B:Anim 1,($8000+6,10);" : Rem This part sets uo the guns horizontally flipped ANIMATION image for moving to the right
_GUN$=_GUN$+"label C:Let X=RT;Let Y=RU;If RW=-1 Jump label D;Pause;Jump label C;" : Rem This constantly centres the GUN around the main body of the ROBOT by using the main bodys X and Y coardinates - placed in RT and RU.
_BACKPACK$="label D:Anim 1,(2,10);" : Rem Set up the ANIMATION frame for moving left
_BACKPACK$=_BACKPACK$+"label A:Let X=RT;Let Y=RU;If RW=1 Jump label B;Pause;Jump label A;" : Rem Again we just centre the backpack around the main body of the ROBOT by setting it to the same X and Y coardinates of the main body - RT and RU
_BACKPACK$=_BACKPACK$+"label B:Anim 1,($8000+2,10);" : Rem Set up the horizontally flipped ANIMATION frame for moving right
_BACKPACK$=_BACKPACK$+"label C:Let X=RT;Let Y=RU;If RW=-1 Jump label D;Pause;Jump label C;" : Rem Again we just centre the backpack around the main body of the ROBOT by setting it to the same X and Y coardinates of the main body - RT and RU
' ***********************************
' * Here we have FIREBALL number 1. *
' ***********************************
_FIREBALL1$="label R:Let RV=0;Let X=-500;Pause;Anim 0,(7,10);" : Rem This line places the fireball off the screen until it has been fired
_FIREBALL1$=_FIREBALL1$+"label A: For R0=1 To 23; Next R0;" : Rem This just makes sure that there is a delay in the amount of fireballs that the ROBOT will shoot - so that the player in the game can kill the buggar!
_FIREBALL1$=_FIREBALL1$+"If Z(1000)>500 Jump label B;Jump label A;" : Rem This is the line that decides wheter the fireballs should be fired or not by selecting a RANDOM number!
_FIREBALL1$=_FIREBALL1$+"label B:Let RV=2;If RW=-1 Jump label C;" : Rem This tells the FIREBALL number 2 to FIRE - by setting RV to 2
_FIREBALL1$=_FIREBALL1$+"Anim 0,(7,10);Let X=RT+20;Let Y=RU+35;Pause;Jump label D;" : Rem This sets up the fireball if its moving to the left and centers it around the main body and guns X and Y coardinates - RT+20 and RU+35
_FIREBALL1$=_FIREBALL1$+"label C:Anim 0,($8000+7,10);Let X=RT-20;Let Y=RU+35;Pause;Jump label E;" : Rem This sets up the fireball if its moving to the right and centers it around the main body and guns X and Y caordinates - RT-20 and RU+35
_FIREBALL1$=_FIREBALL1$+"label D:Pause;Let X=X+2;Let Y=Y-1;If X>340 Jump label R;Jump label D;" : Rem This moves the fireball to the right
_FIREBALL1$=_FIREBALL1$+"label E:Pause;Let X=X-2;Let Y=Y-1;If X<-30 Jump label R;Jump label E;" : Rem This moves the fireball to the left
' ******************************
' * And last - but not least!. *
' * We have Fireball number 2. *
' ******************************
_FIREBALL2$="label R:Let X=-500;Pause;Anim 0,(7,10);" : Rem This line places the fireball off the screen until it has been fired
_FIREBALL2$=_FIREBALL2$+"label A:Pause;If RV=2 Jump label B;Jump label A;" : Rem Constantly checks to see if it should fire
_FIREBALL2$=_FIREBALL2$+"label B:If RW=-1 Jump label C;" : Rem Is the ROBOT facing to the right? If so then jump to label C which setsup the fireball moving to the right otherwise move on to next line!!
_FIREBALL2$=_FIREBALL2$+"Anim 0,(7,10);Let X=RT+20;Let Y=RU+35;Pause;Jump label D;" : Rem This line sets up the fireball for moving to the left
_FIREBALL2$=_FIREBALL2$+"label C:Anim 0,($8000+7,10);Let X=RT-20;Let Y=RU+35;Pause;Jump label E;" : Rem This line sets up the fireball for moving to the right
_FIREBALL2$=_FIREBALL2$+"label D:Pause;Let X=X+2;Let Y=Y+1;If X>340 Jump label R;Jump label D;" : Rem This line controls the fireball moving to the right
_FIREBALL2$=_FIREBALL2$+"label E:Pause;Let X=X-2;Let Y=Y+1;If X<-30 Jump label R;Jump label E;" : Rem This line controls the fireball moving to the left